<div class="leftmenu">        
    <ul class="nav nav-tabs nav-stacked">
        <li class="nav-header">Navigation</li>
        
        <?php foreach($menus as $row) { ?>
        <?php if($row['menu']==$current) { $active = 'class="active"'; } else { $active = ''; } ?>
        <li <?php echo $active ?>><a href="<?php echo base_url().$row['link'] ?>"><span class="<?php echo $row['class'] ?>"></span><?php echo $row['menu'] ?></a></li>
        <?php } ?>
       
    </ul>
</div><!--leftmenu-->